﻿using System;
using System.Text;
using System.Xml;

namespace Org.AI.Neural
{
    class XmlNeuralNetwork
    {

        private void GetNeuronFromNode(XmlNode neuronNode)
        {
            Neuron neuron=new Neuron();

            XmlNode node = neuronNode.SelectNodes("@id")[0];
            neuron.Id = int.Parse(node.InnerXml);

            node = neuronNode.SelectNodes("layer")[0];
            neuron.Layer = int.Parse(node.InnerXml);

            node = neuronNode.SelectNodes("threshold");
            neuron.Threshold = double.Parse(node.InnerXml);

            XmlNode[] nodes = neuronNode.SelectNodes("inputs/input-connection");
            foreach (XmlNode n in nodes)
            {
                NeuronConnection connection = new NeuronConnection();
                node = n.SelectNodes("from")[0];
                n

            }
        }
    }
}
